home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / MiscKit1.7.1 / MiscKit / Headers / misckit / MiscFile+Info.h < prev    next >
Encoding:
Text File  |  1995-01-28  |  1.8 KB  |  63 lines

  1. /************************************************************************
  2.   CATEGORY:            MiscFile (Info)
  3.   PROGRAMMER:        Todd Thomas, Copyright 1994, 1995.
  4.   BEGAN:            December 22, 1994
  5.   LAST CHANGED:        January 25, 1995
  6.   CHANGES:            -
  7.   VERSION:            0.3
  8.   DECLARED IN:        <misckit/MiscFile.h>
  9.   
  10.   Adds the ability to get some useful information about the MiscFile.
  11.   If you are more familiar with standard UNIX calls, check out the
  12.   MiscFile+Unix category. Most all the methods use either -stat, -lstat
  13.   or -access for their information.
  14.  
  15.   This object is included in the MiscKit by permission from the author
  16.   and its use is governed by the MiscKit license, found in the file
  17.   "LICENSE.rtf" in the MiscKit distribution.  Please refer to that file
  18.   for a list of all applicable permissions and restrictions.
  19.        
  20.  *************************************************************************/
  21.  
  22. @class MiscUser;
  23. @class MiscUserGroup;
  24. @class MiscTime;
  25. @class NXImage;
  26.  
  27.  
  28. @interface MiscFile (Info)
  29.  
  30. // Asking a MiscFile about it's access rights.
  31. - (BOOL)hasPermissions: (int)perms for: (int)who;
  32.  
  33. // Some more inuitive method names that use stat(2) or lstat(2), depending
  34. // upon the value of +(BOOL)useLinkInfo.
  35. - (BOOL)isSymbolicLink;
  36. - (BOOL)isDirectory;
  37. - (dev_t)device;
  38. - (ino_t)inode;
  39. - (u_short)permissions;
  40. - (short)hardLinks;
  41. - (MiscUser *)owner;
  42. - (MiscUserGroup *)group;
  43. - (dev_t)deviceType;
  44. - (off_t)size;
  45. - (long)blocksAllocated;
  46. - (long)optimalBlockSize;
  47.  
  48. - (MiscTime *)lastAccessTime;
  49. - (MiscTime *)lastModifyTime;
  50. - (MiscTime *)lastStatusChangeTime;
  51.  
  52. // Some methods to extract info about the MiscFile (uses access(2))
  53. - (BOOL)readAccess;
  54. - (BOOL)writeAccess;
  55. - (BOOL)executeAccess;
  56. - (BOOL)doesExist;
  57.  
  58. // This will likely be moved to some AppKit dependent category someday.
  59. - (NXImage *)iconImage;
  60.  
  61. @end
  62.  
  63.